import request from "@/utils/request";

// 查询用户列表
export const userMgrUserListService = (params) => {
  return request.get("/admin/sys-user/pages", { params });
};

// 更新用户状态
export const userMgrUpdateStatusService = (id, status) => {
  return request.put(`/admin/sys-user/updateStatus/${id}/${status}`);
};

// 新增用户
export const userMgrAddService = (data) => {
  return request.post("/admin/sys-user/save", data);
};

// 修改用户
export const userMgrUpdateService = (data) => {
  return request.put("/admin/sys-user/update", data);
};

// 删除用户
// 传入数组时要加入{}
export const userMgrDeleteService = (data) => {
  return request.delete(`/admin/sys-user/batchDelete`, { data });
};
